package com.coolgor.axnut.dao.auth;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.coolgor.axnut.entity.auth.Function;

public interface FunctionDao {

	Function queryFunctionById(Long functionID);
	
	List<Function> queryFunctionTreeByParentID(@Param("parentID") Long parentID,
												@Param("status") String status);	
	
	List<Function> queryFunctionListByParentIDs(@Param("parentIDs") List<Long> parentIDs,
												@Param("status") String status);	
	
	List<Function> queryFunctionListByParentIDsInRoleID(@Param("parentIDs") List<Long> parentIDs,
														@Param("roleID") Long roleID,
														@Param("status") String status);

	List<Function> queryFunctionList(@Param("functionCondition") Function functionCondition,
										@Param("rowIndex") int rowIndex,
										@Param("pageSize") int pageSize);
	
	int queryFunctionCount(@Param("functionCondition") Function functionCondition);
	
	int insert(Function function);
	
	int update(Function function);
	
	int delete(Function function);
	
	int deleteBatch(List<Long> functionIDList);
	
}